import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import('../views/Main.vue'),

    children:[
      {
        path:'/Home',
        alias:'',
        name:'Home',
        component:()=>import('../views/Home.vue')
      },
      {
        path:'/Recipe',
        name:'Recipe',
        component:()=>import('../views/Recipe.vue')
      },
      {
        path:'/Notes',
        name:'Notes',
        component:()=>import('../views/Notes.vue')
      },
      {
        path:'/My',
        name:'My',
        component:()=>import('../views/My.vue')
      }
    ]
  },
  {
    path:'/Search',
    name:'Search',
    component:()=>import('../views/Search.vue')
  },
  {
    path:'/SearchInfo',
    name:'SearchInfo',
    component:()=>import('../views/SearchInfo.vue')
  },
  {
    path:'/HotTopic',
    name:'HotTopic',
    component:()=>import('../views/HotTopic.vue')
  },
  {
    path:'/NoteDetails',
    name:'NoteDetails',
    component:()=>import('../views/NoteDetails.vue')
  },
  {
    path:'/Topicdetail',
    name:'Topicdetail',
    component:()=>import('../views/Topicdetail.vue')
  },
  {
    path:'/RecipeDetail',
    name:'RecipeDetail',
    component:()=>import('../views/RecipeDetail.vue')
  },
  {
    path:'/UserDetails',
    name:'UserDetails',
    component:()=>import('../views/UserDetails.vue')
  },
  {
    path:'/Login',
    name:'Login',
    component:()=>import('../views/Login.vue')
  },
  {
    path:'/Registered',
    name:'Registered',
    component:()=>import('../views/Registered.vue')
  },
  {
    path:'/Set',
    name:'Set',
    component:()=>import('../views/Set.vue')
  },
  {
    path:'/PersonalData',
    name:'PersonalData',
    component:()=>import('../views/PersonalData.vue')
  },
  {
    path:'/MyFocus',
    name:'MyFocus',
    component:()=>import('../views/MyFocus.vue')
  }
]

const router = new VueRouter({
  mode:'hash',
  routes
})

export default router
